<script id="content" type="text/template">
	
	<!--if{response.management_parent_get}-->
	<div class="panel panel-default">
		<div class="panel-body">
          	<div>父级菜单ID：<!--{response.management_parent_get.management_id}--></div>
			<div>父级菜单名称：<!--{response.management_parent_get.management_name}--></div>
			<div>父级菜单简介：<!--{response.management_parent_get.management_info}--></div>
			<div>更新时间：<!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.management_parent_get.management_update_time) * 1000)}--></div>
			<div>操作：
				<a href="#/administrator/management_edit/?id=<!--{response.management_parent_get.management_id}-->" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-edit"></span>编辑</a>
			</div>
		</div>
	</div>
	<!--/if-->
	
	
	<input name="image-files" type="file" style="left:-99999px;position:absolute;"/>
  	<button class="btn btn-default" type="button" action-button="add" <!--if{response.type_parent_get.type_id}-->data-parent-id="<!--{response.type_parent_get.type_id}-->"<!--/if--> ><span class="glyphicon glyphicon-plus"></span> 添加</button>
	<button class="btn btn-default" type="button" action-button="sort"><span class="glyphicon glyphicon-sort"></span> 排序</button>
	<button class="btn btn-default" type="button" action-button="state_show"><span class="glyphicon glyphicon-ok-sign"></span> 开启</button>
	<button class="btn btn-default" type="button" action-button="state_hide"><span class="glyphicon glyphicon-minus-sign"></span> 关闭</button>
	<button class="btn btn-danger" type="button" action-button="remove"><span class="glyphicon glyphicon-trash"></span> 删除</button>
	<button class="btn btn-default search" type="button" ><span class="glyphicon glyphicon-filter"></span> 筛选</button>
	<!--if{http().anchor.query.search}--><span class="label label-default">存在筛选</span><!--/if-->
	
	<hr/>
	<table class="table table-striped">
      <thead>
        <tr>
          <th><input type="checkbox" action-table="checkbox-all"></th>	
          <th>#</th>
          <th>
          	<!--if{http().anchor.query.sort == "name_desc"}-->
          	<a href="javascript:;" action-sort="name_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>菜单名称</a>
          	<!--elseif{http().anchor.query.sort == "name_asc"}-->
          	<a href="javascript:;" action-sort="name_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>菜单名称</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="name_desc">菜单名称</a>
          	<!--/if-->
          </th>
          <th>菜单描述</th>
          <th>
          	<!--if{http().anchor.query.sort == "page_desc"}-->
          	<a href="javascript:;" action-sort="page_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>页面标识</a>
          	<!--elseif{http().anchor.query.sort == "page_asc"}-->
          	<a href="javascript:;" action-sort="page_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>页面标识</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="page_desc">页面标识</a>
          	<!--/if-->
          </th>
          <th>管理权限</th>
          <th>路由配置</th>
          <th>
          	<!--if{http().anchor.query.sort == "hide_desc"}-->
          	<a href="javascript:;" action-sort="hide_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>隐藏触发</a>
          	<!--elseif{http().anchor.query.sort == "hide_asc"}-->
          	<a href="javascript:;" action-sort="hide_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>隐藏触发</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="hide_desc">隐藏触发</a>
          	<!--/if-->
          </th>
          
          <th>
          	<!--if{http().anchor.query.sort == "state_desc"}-->
          	<a href="javascript:;" action-sort="state_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>状态</a>
          	<!--elseif{http().anchor.query.sort == "state_asc"}-->
          	<a href="javascript:;" action-sort="state_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>状态</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="state_desc">状态</a>
          	<!--/if-->
          </th>
          
          <th>
          	<!--if{http().anchor.query.sort == "sort_desc"}-->
          	<a href="javascript:;" action-sort="sort_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>排序</a>
          	<!--elseif{http().anchor.query.sort == "sort_asc"}-->
          	<a href="javascript:;" action-sort="sort_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>排序</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="sort_desc">排序</a>
          	<!--/if-->
          </th>
          <th>
          	<!--if{http().anchor.query.sort == "update_time_desc"}-->
          	<a href="javascript:;" action-sort="update_time_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>更新时间</a>
          	<!--elseif{http().anchor.query.sort == "update_time_asc"}-->
          	<a href="javascript:;" action-sort="update_time_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>更新时间</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="update_time_desc">更新时间</a>
          	<!--/if-->
          </th>
          
          <!--if{response.management_parent_get}-->
          <!--else-->
          <th>
          	<!--if{http().anchor.query.sort == "son_desc"}-->
          	<a href="javascript:;" action-sort="son_asc"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span>子级</a>
          	<!--elseif{http().anchor.query.sort == "son_asc"}-->
          	<a href="javascript:;" action-sort="son_desc"><span class="glyphicon glyphicon-sort-by-attributes"></span>子级</a>
          	<!--else-->
          	<a href="javascript:;" action-sort="son_desc">子级</a>
          	<!--/if-->
          </th>
          <!--/if-->
          
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
      	<!--if{response.list.data.length}-->
      	<!--for{var i in response.list.data}-->
      	<tr>
          <th><input type="checkbox" action-table="checkbox" data-id="<!--{response.list.data[i].management_id}-->"></th>
          <td><!--{parseInt(i)+1+((parseInt(response.list.page_now) - 1) * response.list.page_size)}--></td>
          <th><!--{response.list.data[i].management_name}--></th>
          <td>
          	<div class="tips" data-title="查看菜单描述" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: 100px;cursor: pointer;" data="<!--{response.list.data[i].management_info}-->"><!--{response.list.data[i].management_info}--></div>
          </td>
          <td><!--{response.list.data[i].management_page}--></td>
          <td>
          <!--if{response.list.data[i].authority_id}-->	
          <code><!--{response.list.data[i].authority_name}--></code>
          <div style="color: #999;font-size: 12px;"><!--{response.list.data[i].authority_id}--></div>
          <!--else-->
          -
          <!--/if-->
          </td>
          
          <td>
          	<!--if{response.list.data[i].management_href}-->
          	<div class="tips" data-title="查看href参数" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: 100px;cursor: pointer;" data="<!--{response.list.data[i].management_href}-->"><span class="label label-default">href</span></div>
          	<!--/if-->
          	<!--if{response.list.data[i].management_query}-->
          	<div class="tips" data-title="查看query参数" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: 100px;cursor: pointer;" data="<!--{response.list.data[i].management_query}-->"><span class="label label-default">query</span></div>
          	<!--/if-->
          	<!--if{response.list.data[i].management_path}-->
          	<div class="tips" data-title="查看path参数" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: 100px;cursor: pointer;" data="<!--{response.list.data[i].management_path}-->"><span class="label label-default">path</span></div>
          	<!--/if-->
          	<div style="color: #999;font-size: 12px;"><!--{response.list.data[i].management_target}--></div>
          </td>
          
          <td>
          <!--if{parseInt(response.list.data[i].management_hide)}-->
          <span class="label label-warning">隐藏</span>
          <!--else-->
          <span class="label label-info">显示</span>
          <!--/if-->
          </td>
          
          <td>
          <!--if{parseInt(response.list.data[i].management_state)}-->
          <span class="label label-success">开启</span>
          <!--else-->
          <span class="label label-danger">关闭</span>
          <!--/if-->
          </td>
          
          <td><input style="width: 50px;" type="text" class="form-control" placeholder="排序" action-table="sort" data-id="<!--{response.list.data[i].management_id}-->" value="<!--{response.list.data[i].management_sort}-->"></td>
          
          <td><!--{WangAho().date("yyyy/MM/dd HH:mm EEE", parseInt(response.list.data[i].management_update_time) * 1000)}--></td>
          
          <!--if{response.management_parent_get}-->
          <!--else-->
          <td><a href="#/administrator/management_list/?search=%257B%2522management_parent_id%2522%253A%2522<!--{response.list.data[i].management_id}-->%2522%257D"><!--{response.list.data[i].management_son_count}-->个</a></td>
          <!--/if-->
          
          <td>
          	<a href="#/administrator/management_edit/?id=<!--{response.list.data[i].management_id}-->" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-edit"></span>编辑</a>
      		<!--if{response.management_parent_get}-->
      		<!--else-->
	    	<a href="#/administrator/management_list/?search=%257B%2522management_parent_id%2522%253A%2522<!--{response.list.data[i].management_id}-->%2522%257D" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-share"></span>查看子级</a>
	    	<!--/if-->
          </td>
        </tr>
        <!--/for-->
      	<!--else-->
        <tr>
          <td colspan="12" align="center">无数据</td>
        </tr>
        <!--/if-->
      </tbody>
    </table>
    
    
    
    <!--if{response.list.data.length}-->
	<div class="paging" style="text-align: center;">
		<button class="first btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="1" type="button">首页</button>
		<button class="previous btn btn-default <!--if helper{"is_first_page" (response.list.page_now)}-->disabled<!--/if-->" data-page="<!--{parseInt(response.list.page_now) - 1}-->" type="button">上一页</button>
		<button class="btn btn-default" type="button">
			第<!--{response.list.page_now}-->页
			/ 共<!--{response.list.page_count}-->页
			/ 有<!--{response.list.row_count}-->条数据</button>
		<button class="next btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{parseInt(response.list.page_now) + 1}-->">下一页</button>
		<button class="end btn btn-default <!--if helper{"is_end_page" (response.list.page_now, response.list.page_count)}-->disabled<!--/if-->" type="button" data-page="<!--{response.list.page_count}-->">尾页</button>
	</div>
	<div class="form-inline" style="text-align: center;margin-top: 10px;">
		<div class="form-group">
			<input type="text" class="form-control paging--value" placeholder="输入跳转页" style="width: 100px;">
		</div>
		<button type="button" class="btn btn-default paging--submit">跳转</button>
	</div>
	<!--/if-->
	
	
</script>



<script id="search" type="text/template">
	<div style="padding: 10px;width: 500px;">
		<div class="form-group">
		    <label>菜单ID：</label>
		    <input type="text" class="form-control" search placeholder="输入要搜索的菜单ID" name="management_id" value="<!--{search.management_id}-->">
		</div>
		<div class="form-group">
		    <label>菜单名称：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的菜单名称" name="management_name" value="<!--{search.management_name}-->">
		</div>
		<div class="form-group">
		    <label>页面标识：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的页面标识" name="management_page" value="<!--{search.management_page}-->">
		</div>
		<div class="form-group">
		    <label>菜单父级ID：</label>
		    <input type="text" class="form-control" placeholder="输入要搜索的菜单父级ID" name="management_parent_id" value="<!--{search.management_parent_id}-->">
		</div>
		
		<br/>
		<div class="btn-group" style="width: 100%;">
			<button type="button" class="btn btn-primary" style="width: 50%;" name="search-submit">确定筛选</button>
			<button type="button" class="btn btn-default" style="width: 50%;" name="search-clear">清理筛选</button>
		</div>
	</div>
</script>



